package com.lonely.fx.登录页案例;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

import java.util.Scanner;

/**
 * @date: 2022-07-06 16:38
 * @author: ztkj-hzb
 * @description: 登录成功页面
 **/
public class SuccessMain  {

    private String userName;
    private String password;

    public SuccessMain(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }


    /**
     *
     */
    public void show() {

        BorderPane borderPane = new BorderPane();
        borderPane.setCenter(new Label(String.format("用户名：%s，密码：%s",userName,password)));

        Stage primaryStage = new Stage();
        primaryStage.setScene(new Scene(borderPane));
        primaryStage.setWidth(600);
        primaryStage.setHeight(500);
        primaryStage.show();

    }
}
